import axios from "axios"

const instance = axios.create({
    baseURL: 'http://pcapi-xiaotuxian-front-devtest.itheima.net',
    timeout: 5000
})


instance.interceptors.request.use((config) => {
    return config
}, err => {
    return Promise.reject(err)
})


instance.interceptors.response.use(response => {
    // 对响应数据做点什么
    return response;
}, err => {
    return Promise.reject(err)
})

export default instance